<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-on</title>
    <meta charset="UTF-8">
    <script src="js/vue.js"></script>
</head>
<body>

<div id="app">
    <input type="button" value="变猪" v-on:click="show">
    <input type="button" value="变帅"  @click="becomeCool">
    <input type="text" value="猪" v-on:blur="becomeCool">
    <input type="text" value="请输入密码" @blur="becomeCool">

</div>

<script>
    new Vue({
        el:"#app",
        data(){
            return{

            }
        },
        methods:{
            show(){
                alert("你是猪");
            },
            becomeCool(){
                alert("你变帅了");
            }

        }
    })
</script>

</body>
</html>